<template>
  <div>
    <el-dropdown>
      <i class="el-icon-setting" style="margin-right: 15px"></i>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item @click.native="toInformation">查看个人资料</el-dropdown-item>
        <el-dropdown-item @click.native="toLogin">退出登录</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
    <span>您好，维修人员</span>
  </div>
</template>

<script>
export default {
  methods: {
    toInformation () {
      this.$router.push('/keeper/information')
    },
    toLogin () {
      localStorage.removeItem('user')
      this.$router.push('/login')
    }
  }
}
</script>
